<%@ page language="java" import="java.util.*" pageEncoding="utf-8" contentType="text/html;charset=UTF-8" isELIgnored="false"%>
<%@ page import="com.example.bbs.model.User" %>
<%@ page import="com.example.bbs.model.Block" %>
<%@ page import="com.example.bbs.utils.TimeUtil" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>head</title>
  <meta charset="utf-8"/>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <script type="text/javascript">
    function show(){
      document.getElementById("drop").style.display = "block";
    }

    function hide(){
      document.getElementById("drop").style.display = "none";
    }
  </script>
  <style type="text/css">
    .head ul, .head li{
      list-style-type:none;
      display:inline-block;
    }
    .head ul{
      float:right;
    }

    #drop{
      display:none;
      position:absolute;
    }

    #drop div{
      margin-top:5px;
    }

    .hover{
      cursor: pointer;
      color:blue;
      text-decoration:underline;
    }
  </style>
</head>
<body>
<div class="head">
  <ul>
    <c:if test="${!(empty sessionScope.loginUser)}">
      <li>欢迎您!${sessionScope.loginUser.userName}</li>
    </c:if>
    <li onmouseover="show()" onmouseout="hide()"><span class="hover">我的</span>
      <div id="drop">
        <div><a href="profile.html">我的资料</a></div>
        <div><a href="my_post.html">我的发帖</a></div>
        <div><a href="my_reply.html">我的回帖</a></div>
      </div>
    </li>
    <li><a href="/bbs/logout.action" >退出登录</a></li>
  </ul>
</div>
</body>
</html>
